﻿@using LunwenYun.Infrastructure.Entities.Entity;
@using LunwenYun.Infrastructure.Entities.Enum;
@using LunwenYun.Tool.Configration;
@{
    User user = null;
    if (HttpContext.Current.User.Identity.IsAuthenticated)
    {
        user = new User().Find(HttpContext.Current.User.Identity.Name);
    }
    Layout = "~/Views/Shared/_o_Main.cshtml";
    
    Article article = ViewBag.Article;
    ViewBag.Title = SiteResource.SiteName + " -- 发起约稿";
}
<div class="mini-layout graybg">
    <form id="form1" method="post" action="/o/postLaunch" class="form-horizontal">
    <input type="hidden" name="id" value="@article.Id" />
    <fieldset>
        <legend style="font-weight: bold; color: #22a7b3; text-align: center">发起约稿</legend>
        <div class="control-group">
            <label class="control-label">
                稿件名称</label>
            <div class="controls">
                <input type="text" placeholder="稿件名称" value="@article.Title" class="span9" disabled="disabled" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                经费预算</label>
            <div class="controls">
                <input type="text" placeholder="经费预算" name="price" class="span9 {required:true,number:true,min:1,max:999999}" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                约稿说明</label>
            <div class="controls">
                <textarea placeholder="约稿说明" name="introduction" class="span9 {required:true}" rows="10"></textarea>
            </div>
        </div>
        <hr />
        <div class="control-group">
            <div class="controls">
                <input type="submit" class="btn btn-large btn-info" value="发起约稿" />
            </div>
        </div>
    </fieldset>
    </form>
</div>
@section tail{
    <script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#form1').validate({
                errorClass: "help-inline",
                errorElement: "span",
                highlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').addClass('error');
                },
                unhighlight: function (element, errorClass, validClass) {
                    $(element).parents('.control-group').removeClass('error');
                }
            });
        });
    </script>
}